<?php
namespace app\common\model;

use think\Model;
use think\model\concern\SoftDelete;

class Account extends Model
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;
    protected $autoWriteTimestamp = true;

    protected function getChangeTypeAttr($v)
    {
        $change_type = ['其他','管理员','转账','支付','提现','签到','激活','退款','充值','结算','未知'];
        return $change_type[$v];
    }

    protected function user()
    {
        return self::belongsTo(User::class, 'user_id')->bind(['name'=>'name','mobile'=>'mobile']);
    }



}